package com.jg.visitor.schedule;

import com.jg.visitor.common.service.ClearTimeoutOrderService;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@EnableScheduling
@Component
public class ClearTimeoutOrderTask {

    @Resource
    private ClearTimeoutOrderService clearTimeoutOrderService;

    @Scheduled(cron = "0 0/1 * * * ? ")
    public void clearTimeOutOrder(){
        clearTimeoutOrderService.clearTimeoutOrder();
    }
}
